﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Master.Master"
    Inherits="System.Web.Mvc.ViewPage<List<OrderEntity>>" %>
<%@ Import Namespace="xTeam.Hengle.Helper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <table class="gv textCenter">
        <thead class="title ">
            <tr>
                <td class="textLeft width150">
                    订单ID
                </td>
                <td class="width100">
                    金额
                </td>
                <td class="width100">
                    数量
                </td>
                <td class="width100">
                    状态
                </td>
                <td class="width150">
                    加入时间
                </td>
                <td class="textLeft">
                    操作
                </td>
            </tr>
        </thead>
        <tbody>
            <%
                foreach (OrderEntity item in Model)
                {
            %>
            <tr>
                <td class="textLeft">
                    <%= Html.ActionLink(item.OrderId , "SaleView" , new { orderId = item.OrderId , uid = item.Uid })%>
                </td>
                <td>
                    <%= item.Price.ToString("0.00") %>
                </td>
                <td>
                    <%= item.Count %>
                </td>
                <td>
                    <%= string.Format("<div class='orderState orderState_{0}'>{1}</div>", item.State, StringExtendFun.OrderStateForManage(item.State))%>
                </td>
                <td>
                    <%=item.AddDate %>
                </td>
                <td class="textLeft">
                    <input type="button" name="btnView" value="查看" />
                    <input type="button" name="btnDel" value="删除" />
                    <%= Html.Hidden("OrderId" , item.OrderId , new {id=Guid.NewGuid() })%>
                    <%= Html.Hidden("Uid" , item.Uid , new {id=Guid.NewGuid() })%>
                </td>
            </tr>
            <%
                }
            
            %>
        </tbody>
    </table>
    <div class="btnBar ">
        <div class="btnBarLeft ">
            <div class="divPager2">
                <%= Html.Pager(ViewData["Pager"]) %>
            </div>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cssLink" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="jsLink" runat="server">
    <script src="<%=Url.Content("~/Scripts/Manage/Order.js") %>" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cssContent" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="jsContent" runat="server">
    <script type="text/javascript">
        $(function () {
            OrderList.PreViewUrl = '<%=Url.Action("SaleView") %>'
            OrderList.DeleteUrl = '<%= Url.Action("SaleItemDelete") %>';
            OrderList.Init();
        });
    </script>
</asp:Content>
